package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * <p>
 * 用户权限中间表
 * </p>
 *
 * @author cy
 * @since 2020-10-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@AllArgsConstructor
public class UOperation extends Model<UOperation> {

    private static final long serialVersionUID = 1L;


    @TableId(value = "u_operation_id", type = IdType.AUTO)
    private Integer uOperationId;

    /**
     * 用户id
     */
    private Integer uId;

    /**
     * 权限id
     */
    private Integer oId;

    public UOperation(Integer uId, Integer oId) {
        this.uId = uId;
        this.oId = oId;
    }



    @Override
    protected Serializable pkVal() {
        return this.uId;
    }

}
